<template>
  <jin-bpmn
    :xml="xml"
    :form-size="formSize"
    :form-property="formProperty"
    :form-key="formKey"
    :show-dialog="true"
    :is-view="false"
    :complete-list="completeList"
    :todo-list="todoList"
    :form-detail="formDetail"
  />
</template>

<script>
import { xmlStr } from '@/mock/xmlStr'
import JinBpmn from '../package/index'
export default {
  name: 'Demo',
  components: { JinBpmn },
  data() {
    return {
      xml: xmlStr,
      formSize: 'small',
      formKey: '1',
      formProperty: [
        {
          id: '1',
          name: '请假流程',
          property: [{
            id: 'datetime',
            name: '请假时间',
            readable: true,
            writable: true
          }, {
            id: 'days',
            name: '请假天数',
            readable: true,
            writable: true
          }, {
            id: 'reason',
            name: '请假理由',
            readable: true,
            writable: true
          }]
        }
      ],
      completeList: ['Activity_17aaev3'],
      todoList: ['Activity_1w6a7ng', 'Activity_05frkae'],
      formDetail: [{
        id: 'Activity_1w6a7ng',
        value: [{
          name: '流程节点名称：', value: '经理审批' },
        { name: '审批时间', value: '2022-01-01 00:00:00' },
        { name: '审批人', value: '张三' }]
      }, {
        id: 'Activity_0gzc1m9',
        value: [
          { name: '流程节点名称：', value: '财务审批' },
          { name: '审批时间', value: '2022-01-01 00:00:00' },
          { name: '审批人：', value: '李四' }]
      }]
    }
  }
}
</script>
<style lang="scss">
// 全局样式
html {
  margin: 0;
  padding: 0;
}
body {
  margin: 0;
  padding: 0;
  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
  }
  ::-webkit-scrollbar-thumb {
    width: 10px;
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(35, 46, 64, 0.05);
    background: rgba(35, 46, 64, 0.05);
  }
  ::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
  }
  :hover::-webkit-scrollbar-thumb {
    width: 10px;
    border-radius: 10px;
    box-shadow: inset 0 0 5px rgba(35, 46, 64, 0.05);
    background: rgba(35, 46, 64, 0.1);
  }
  :hover::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
  }
}
</style>
